package controller.listeners.baseconfig;

import model.BaseConfigModel;
import view.BaseConfigView;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.TableEditor;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;

public class RowCheckListener implements Listener {

	private BaseConfigView _view;
	private BaseConfigModel _model;
	
	public RowCheckListener(BaseConfigView view, BaseConfigModel model) {
		this._model = model;
		this._view = view;
	}
	
	@Override
	public void handleEvent(Event event) {
          _model.changeData(((TableItem)event.item).getText(),(event.detail == SWT.CHECK));
      }

}
